
<?php
  require("utilities.php");
  if($_GET['delete']){
    $sid = (int)$_GET['delete'];
    mysql_query("Delete From student where SID = {$sid}");
    header("Location: database.php");
    exit;
  }
  if($_POST){
    $info=array();
    $info['Fname'] = mysql_real_escape_string($_POST['Fname']);
    $info['Lname'] = mysql_real_escape_string($_POST['Lname']);
    $info['Bday']  = mysql_real_escape_string($_POST['Bday']);
    mysql_query("INSERT into student (Fname,Lname,Bday) VALUES ('{$info['Fname']}','{$info['Lname']}','{$info['Bday']}');");
    header("Location: database.php");
    exit;
  }
?>
<!--- um...layout sturf -->
<html>
  <head> 
    <title> MathFlow </title> 
    <link rel="stylesheet" href="main.css" type="text/css"/>
  </head>
  <body>
    <!-- Main Layouy -->
    <div id="container">
      <!-- TITLE -->
      <div id="title">
        <?php
          echo "MathFlow";
        ?>
      </div>
      <!-- NAVIGATION --> 
      <div id="navigation">
        <ul id="navList">
        <li><a href="http://ix.cs.uoregon.edu/~trevor/jsMath/jsMath-3.6e/test/jsReg.php">LaTex Renderer</a></li>
        <!--  <li><a href="http://ix.cs.uoregon.edu/~trevor/database.php">DataBase Testbed</a></li> -->
        </ul> 
      </div>
      <!-- CONTENT -->
      <div id="content">
      </div>
    </div>
  </body>
</html> 
